package com.xj.lucene;

import org.apache.lucene.index.AtomicReader;
import org.apache.lucene.index.AtomicReaderContext;
import org.apache.lucene.index.DocsEnum;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.DocIdSet;
import org.apache.lucene.search.Filter;
import org.apache.lucene.search.MultiTermQuery;
import org.apache.lucene.util.Bits;

import java.io.IOException;

public class MyFilter extends Filter{
	private MultiTermQuery query;
	@Override
	public DocIdSet getDocIdSet(AtomicReaderContext context, Bits acceptDocs) throws IOException {
		final AtomicReader reader = context.reader();
	    Term term=new Term("size");
	    DocsEnum doc= reader.termDocsEnum(term);
	    int id=-1;
	    while((id=doc.nextDoc())!=-1){
	    	id=-1;
	    };
	    
	   return null;
	}

}
